package com.iwhalecloud.bss.kite.cucc.service.attr.handler;

import com.iwhalecloud.bss.kite.common.constant.KeyConsts;
import com.iwhalecloud.bss.kite.common.util.KiteStringUtils;
import com.iwhalecloud.bss.kite.cucc.common.constant.LocalKeyConsts;
import com.iwhalecloud.bss.kite.manager.api.IOperateSceneInstService;
import com.iwhalecloud.bss.kite.manager.inst.KiteAttr;
import com.iwhalecloud.bss.kite.manager.inst.KiteInst;
import com.iwhalecloud.bss.kite.service.attr.AttrData;
import com.iwhalecloud.bss.kite.service.attr.data.CustAttrData;
import com.iwhalecloud.bss.kite.service.attr.handler.AbstractAttrHandler;
import com.ztesoft.bss.common.util.ContextUtil;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author liaojing
 * NB物联网水务抄表服务-NB通用连接-30MB-36月
 * @create 2022-01-19-10:01
 */
public class NBComnonLinkAttrHandler extends AbstractAttrHandler<KiteInst, CustAttrData> {

    @Autowired
    private IOperateSceneInstService operateSceneInstService;

    @Override
    public void after(KiteAttr attr, KiteInst inst, CustAttrData data) {
        super.after(attr, inst, data);
        //产品变更 业务信息 置灰
        if(KiteStringUtils.isEqual(data.getServiceOfferId(), "2826")){
            if(KiteStringUtils.equalsAny(inst.getSpecId(),"50000029")){
                //企业自采
                inst.getAttrMap().get("200003676").setIsEdit(KeyConsts.IFTRUE_F);
                //合同约定开卡数量
                inst.getAttrMap().get("200003677").setIsEdit(KeyConsts.IFTRUE_F);
                //承载平台
                inst.getAttrMap().get("200003675").setIsEdit(KeyConsts.IFTRUE_F);
                //SIM卡类型
                inst.getAttrMap().get("200003678").setIsEdit(KeyConsts.IFTRUE_F);
                //卡商
                inst.getAttrMap().get("200004040").setIsEdit(KeyConsts.IFTRUE_F);
                //卡号数据服务费(元/张)
                inst.getAttrMap().get("200003679").setIsEdit(KeyConsts.IFTRUE_F);
                //单卡月均流量
                inst.getAttrMap().get("210003994").setIsEdit(KeyConsts.IFTRUE_F);
                //连接类型
                inst.getAttrMap().get("200003674").setIsEdit(KeyConsts.IFTRUE_F);
                //漫游限制
                inst.getAttrMap().get("200004080").setIsEdit(KeyConsts.IFTRUE_F);
            }
        }
    }

}
